import torch
perm_idx = torch.randperm(10)
print(perm_idx)